package com.ruicar.afs.cloud.risk.tortoise.dto.response.apply;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruicar.afs.cloud.risk.tortoise.anno.RefData;
import com.ruicar.afs.cloud.risk.tortoise.dto.response.GwtRefData;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description
 * @Author Peng Jinbo
 * @Date 2020/07/27 18:51
 */
@Data
@AllArgsConstructor
@Builder
@ApiModel("申请信息 - camain")
public class GwtMain extends GwtRefData implements Serializable {

    /**
     * Application no
     */
    @JsonInclude
    @JSONField(name = "applicationno")
    @JsonProperty("applicationno")
    private String applicationNo;

    /**
     * First submit date
     */
    @JsonInclude
    @JSONField(name = "submitdatestring", format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("submitdatestring")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date firstSubmitDate;

    /**
     * Loan amount
     */
    @JsonInclude
    @JSONField(name = "loanmoney")
    @JsonProperty("loanmoney")
    private BigDecimal loanAmount;

    /**
     * Agree date
     */
    @JsonInclude
    @JSONField(name = "approvetimestring", format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("approvetimestring")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date agreeDate;

    /**
     * Down pay scale
     */
    @JsonInclude
    @JSONField(name = "downratio")
    @JsonProperty("downratio")
    private BigDecimal downPayScale;

    /**
     * Reject reason
     */
    @JsonInclude
    @RefData(dicKey = "suggestRejectF")
    @JSONField(name = "refusereason")
    @JsonProperty("refusereason")
    private String rejectReason;

    /**
     * Loan period
     */
    @JsonInclude
    @JSONField(name = "loanperiod")
    @JsonProperty("loanperiod")
    private String loanPeriod;

    /**
     * Sell phone
     */
    @JsonInclude
    @JSONField(name = "applyuserp")
    @JsonProperty("applyuserp")
    private String sellPhone;

    /**
     * Business status in
     */
    @JsonInclude
    @RefData(dicKey = "businessStateIn")
    @JSONField(name = "internalstatus")
    @JsonProperty("internalstatus")
    private String businessStatusIn;

    /**
     * Approve status
     */
    @JsonInclude
    @RefData(useFieldName = true)
    @JSONField(name = "approvestatus")
    @JsonProperty("approvestatus")
    private String approveStatus;

    @JSONField(serialize = false)
    @JsonIgnore
    private String approveStatusName;

    /**
     * Sell name
     */
    @JsonInclude
    @JSONField(name = "applyusername")
    @JsonProperty("applyusername")
    private String sellName;

    /**
     * Green energy
     */
    @JsonInclude
    @RefData(dicKey = "isType,whetherStatus", translatedKey = "whetherStatus",whetherDesc = "新能源", defaultVal = "no")
    @JSONField(name = "energylogo")
    @JsonProperty("energylogo")
    private String greenEnergy;

    /**
     * Dealer name
     */
    @JsonInclude
    @JSONField(name = "primarydistributor")
    @JsonProperty("primarydistributor")
    private String dealerName;

    /**
     * Direct
     */
    @JsonInclude
    @RefData(dicKey = "isType", translatedKey = "whetherStatus",whetherDesc = "直营",defaultVal = "no")
    @JSONField(name = "directsale")
    @JsonProperty("directsale")
    private String direct;

    /**
     * Online
     */
    @JsonInclude
    @RefData(dicKey = "isType", translatedKey = "whetherStatus", whetherDesc = "网约车",defaultVal = "no")
    @JSONField(name = "onlinecar")
    @JsonProperty("onlinecar")
    private String online;

    /**
     * Remote sign
     */
    @JsonInclude
    @RefData(dicKey = "isType", translatedKey = "whetherStatus",whetherDesc = "远程签署",defaultVal = "no")
    @JSONField(name = "remotesign")
    @JsonProperty("remotesign")
    private String remoteSign;

    /**
     * Old car
     * 是否二手车
     */
    @JsonInclude
    @RefData(dicKey = "isType", translatedKey = "whetherStatus",whetherDesc = "二手车",defaultVal = "no")
    @JSONField(name = "vehicletype")
    @JsonProperty("vehicletype")
    private String oldCar;

    /**
     * Affiliated
     */
    @JsonInclude
    @RefData(dicKey = "isType", translatedKey = "whetherStatus", whetherDesc = "挂靠",defaultVal = "no")
    @JSONField(name = "affiliatedmode")
    @JsonProperty("affiliatedmode")
    private String affiliated;

    /**
     * Business type
     */
    @JsonInclude
    @RefData(dicKey = "businessType")
    @JSONField(name = "businesstype")
    @JsonProperty("businesstype")
    private String businessType;

    /**
     * Car nature
     */
    @JsonInclude
    @RefData(dicKey = "carNature")
    @JSONField(name = "vehicleproperty")
    @JsonProperty("vehicleproperty")
    private String carNature;


    /**
     * Dealer message
     */
    @JsonInclude
    @JSONField(name = "dealermessage")
    @JsonProperty("dealermessage")
    private String dealerMessage;

}
